package com.gordon.tips.util;

import java.util.ResourceBundle;

public class ReadResource {
	private static final ResourceBundle bundle = ResourceBundle.getBundle("struts");

	private ReadResource() {
	}

	public static String getProperties(String key) {
		String properties = "";
		Object value = bundle.getString(key);
		if (value != null) {
			properties = (String) value;
		}
		return properties;
	}

	public static String getProperties(String key, String defaultValue) {
		String properties = defaultValue;
		Object value = bundle.getString(key);
		if (value != null) {
			properties = (String) value;
		}
		return properties;
	}

}
